import http from "./request.js"
//密码登录
export const getLogin=(data)=>http.post('/login/getLogin',data)
//获取验证码
export const getLoginCode = (data) => http.get('/login/getLoginCode',{params:data})
//验证码登录
export const getLoginByPhone = (data) => http.post('/login/getLoginByPhone',data)
//微信登录
export const getLoginByWX = (data) => http.post('/login/getLoginByWX',data)
//QQ登录
export const getLoginByQQ = (data) => http.post('/login/getLoginByWX',data)
//重置密码
export const updateUserPWD = (data) => http.post('/login/updateUserPWD',data)
//添加用户
export const addBeforeUser = (data) => http.post('/login/addBeforeUser',data)
//首页获取轮播图
export const getJsCarousels = (data) => http.get('/jsCarousels/getJsCarousels',{params:data})
//查看课程
export const getCourses = (data) => http.get('/course/getCourses',{params:data})
//查看课程详情 
export const getCourseDetails = (data) => http.get('/course/getCourseDetails',{params:data})
//查看课程目录
export const getCourseMenu = (data) => http.get('/course/getCourseMenu',{params:data})
//获取课程评论
export const getCourseComments = (data) => http.get('/course/getCourseComments',{params:data})
//获取课程评论总数
export const getCourseCommentsNums = (data) => http.get('/course/getCourseCommentsNums',{params:data})
//查找有哪些评论被点赞
export const getPraisedComms = (data) => http.get('/course/getPraisedComms',{params:data})
//点赞实现
export const getPraisedCommsLog = (data) => http.post('/course/getPraisedCommsLog',data)
//添加课程评论
export const addCourseComment = (data) => http.post('/course/addCourseComment',data)
//查看当前用户对当前课程是否有点赞记录
export const getPraiseCourse = (data) => http.get('/course/getPraiseCourse',{params:data})
//查看当前用户对当前课程是否有收藏记录
export const getCollectionCourse = (data) => http.get('/course/getCollectionCourse',{params:data})
//点赞课程
export const addPraiseCourse = (data) => http.post('/course/addPraiseCourse',data)
//取消课程点赞
export const delPraiseCourse = (data) => http.post('/course/delPraiseCourse',data)
//收藏课程
export const addCollectionCourse = (data) => http.post('/course/addCollectionCourse',data)
//取消课程收藏 
export const delCollectionCourse = (data) => http.post('/course/delCollectionCourse',data)
//获取热度搜索关键字
export const getHotKeywords = (data) => http.get('/course/getHotKeywords',{params:data})

// export const getCourses = (data) => http.get('/indexHome/getCourses',{params:data})

// export const 请求 =(data) => http.post('请求路径',data)
// 微圈分类
export const getActicleCategroy = () => http.get('/acticleCategroy/getActicleCategroy')
// 根据微圈分类查询微圈信息
export const getMicrocircle = (data) => http.get('/microcircle/getMicrocircle',{params:data})
// 根据微圈id查询微圈信息
export const getMicrocircleById = (data) => http.get('/microcircle/getMicrocircleById',{params:data})
// 根据类型和微圈id查询评论信息
export const getComment = (data) => http.get('/comment/getComment',{params:data})
// 添加收藏记录
export const addCollection = (data) => http.post('/collection/addCollection',data)
